// 用于封装组织架构响应接口
import requset from '@/utils/request'

// 封装获取组织架构接口
export const companyDepartment = () => {
  return requset({
    url: '/company/department'
  })
}

// 获取组织架构员工列表
export const sysUserSimple = () => {
  return requset({
    url: '/sys/user/simple'
  })
}

// 新增部门接口
export const companyDepartmentPost = (data) => {
  return requset({
    url: '/company/department',
    method: 'post',
    data
  })
}

// 删除部门接口
export const companyDepartmentDelete = (id) => {
  return requset({
    url: `/company/department/${id}`,
    method: 'delete'
  })
}

// 修改部门接口
export const companyDepartmentPut = (data) => {
  return requset({
    url: `/company/department/${data.id}`,
    method: 'put',
    data
  })
}
